package com.bwie.system.controller;

import com.bwie.common.pojo.res.MenuRes;
import com.bwie.common.result.Result;
import com.bwie.common.utils.TokenUtils;
import com.bwie.system.service.MenuService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequiredArgsConstructor
public class MenuController {
    private final MenuService menuService;

    /**
     * 获取权限树
     * @return
     */
    @GetMapping("/getMenuTreeByUserId")
    public Result<List<MenuRes>> getMenuTreeByUserId() {
        return Result.success(menuService.getMenuTreeByUserId());
    }
}
